package com.softserveinc.model;

import org.springframework.security.core.GrantedAuthority;

/**
 *Role model
 */
public class Role implements GrantedAuthority {
    private int id;
    public static final String ROLE_ADMIN = "ROLE_ADMIN";
    public static final String ROLE_USER = "ROLE_USER";
    //public static enum  Roles{ROLE_ADMIN , ROLE_USER};
    private String authority;
//    Need to add enum with two constants Role.ROLE_USER and Role.ROLE_ADMIN
//    This enum should be used everywhere and all methods should get this enum as parameter (instead of string)

    public void setAuthority(String authority) {
        this.authority = authority;
    }

    @Override
    public String getAuthority() {
        return authority;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }
}
